第二篇就接續 Introduction

來看看Core Components and Native Components

這篇主要討論這些元件是如何在 React-Native 裡運作的。

Views and mobile development

view 在 Android 跟 iOS 中 view 是建構 UI 的基本元件

可以是 text、可以是 button, Image 或是負責響應用戶 input 的元件

這些東西可以互相組合

Native Components

如同 iOS 開發使用 Swift or Objective-C

Android 使用 Kotlin or Java

在 React-Native 使用 JavaScript 調用 React 的元件

React-Native 會在 Runtime 生成對應的原生畫面的元件

這部分原生元件稱為 Native Components


React-Native 有著這些已經能馬上使用的元件可以用在 app 開發上的元件我們稱為 Core Components


React-Native 也可以讓針對平台建立自己的 Native Components

也可以在社區中尋找別人貢獻的元件

Core Components

API

接下去的章節會來教我們 React 元件的應用

下篇待續…

Support

Comments

2022-07-05

⬆︎TOP